package com.ynet.middleground.user.service;

import com.ynet.core.common.ServiceResult;
import com.ynet.middleground.user.bean.*;
import com.ynet.middleground.user.dto.*;

import javax.validation.Valid;
import java.util.List;

/**
 * @description: CFCA证书管理服务
 * @author: Wangxz
 * @create: 2019-11-05 17:03
 **/
public interface CertificateManageService {
    /**
     * CFCA证书申请
     * 
     * @param generateCertReq
     * @return
     */
    public ServiceResult<GenerateCertDto> generateCert(@Valid GenerateCertReq generateCertReq);

    /**
     * CFCA证书更新并下载
     *
     * @param updateDownloadCertReq
     * @return
     */
    public ServiceResult<UpdateDownloadCertDto> updateAndDownloadCert(@Valid UpdateDownloadCertReq updateDownloadCertReq);

    /**
     * 证书冻结
     *
     * @param certFreezeReq
     */

    public  ServiceResult<String> freezeCert(@Valid CertFreezeReq certFreezeReq);

    /**
     * 证书解冻
     *
     * @param certThawReq
     */
    public ServiceResult<String> thawCert(@Valid CertThawReq certThawReq);

    /**
     * 证书吊销
     *
     * @param certRevokeReq
     */
    public ServiceResult<String> revokeCert(@Valid CertRevokeReq certRevokeReq);

    /**
     * 证书更新
     * @param certUpdateReq
     * @return CertUpdateDto
     */
    public ServiceResult<CertUpdateDto> updateCert(@Valid CertUpdateReq certUpdateReq);

    /**
     * 证书下载
     * @param certDownloadReq
     */
    public ServiceResult<CertDownloadDto> downloadCert(@Valid CertDownloadReq certDownloadReq);

    /**
     * 证书补发
     * @param certReissueReq
     */
    public ServiceResult<CertReissueDto> reissueCert(@Valid CertReissueReq certReissueReq);

    /**
     * 证书换发
     * @param certRenewalReq
     */
    public ServiceResult<CertRenewalDto> renewalCert(@Valid CertRenewalReq certRenewalReq);

    /**
     * 证书查询
     * @param certQueryReq
     */
    public ServiceResult<List<CertQueryDto>> queryCertInfo(@Valid CertQueryReq certQueryReq);

    /**
     * 用户绑定cfca证书信息
     * @param requestObject
     * @return
     */
    ServiceResult<String> bindingCert(@Valid BindingCertReq requestObject);
}
